		**Pastoral conflicts and (dis)trust: evidence from Nigeria using an instrumental variable approach**
								*Daniel Tuki*
								
* The codes delow are used to filter out the incidents in the Armed Conflict Location and Event Data project (ACLED) which I classify as Pastoral conflict. The codes below work with the datafile named "ACLED data_1997-2022." To access the ACLED data visit: https://acleddata.com/

* I operationalize pastoral conflits as incidents where at least one of the actors is defined as "Pastoralist" or belongs to the "Fulani" ethnic group.
		
* To keep only conflict incidents in Nigeria: 
keep if country == "Nigeria" 

*To filter out incidents with the word "Pastoralist" in Associated Actors 1 & 2: 
gen pastoral_11 = strmatch(assoc_actor_1, "*Pastoralist*")
gen pastoral_22 = strmatch(assoc_actor_2, "*Pastoralist*")
* The word "Pastoralist" did not occur in the variables "actor1" and "actor2", thus the focus on only the associated actors. 

* To filter out incidents with the word "Fulani" in Actors 1 & 2, and Associated Actors 1 & 2: 
gen fulani_1 = strmatch(actor1, "*Fulani*")
gen fulani_11 = strmatch(assoc_actor_1, "*Fulani*")

gen fulani_2 = strmatch(actor2, "*Fulani*")
gen fulani_22 = strmatch(assoc_actor_2, "*Fulani*")

* key_word: To generate the variable "key_word" where observations greater than 1 implies that the event involves at least one actor who is "Fulani" or "pastoralist": 
gen key_word = pastoral_11 + pastoral_22 + fulani_1 + fulani_11 + fulani_2 + fulani_22

* To drop the observations that do not contain any of the keywords: 
drop if key_word == 0 
* The observations left are those which I define as "Pastoral conflict"


* To drop events that occured after 2020, since this I only consider incidents from 1997 to 2020 in this study:  
drop if year > 2020
* This leaves the observations that I used to create the explanatory variable.


* Table A3: Distribution of pastoral conflicts across Nigeria's states (1997–2020)
tab admin1


* To leave only pastoral conflicts that caused at least one fatality:
drop if fatalities == 0 
* I used these observations to create an alternative measure of conflict exposure, which I used to conduct a robustness check. 
